﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BestLifePOS_Core.Data.Commands;
using BestLifePOS_Core.DomainObjects;
using System.Data;

namespace BestLifePOS_Core.Data.Fascade
{
   public class ProductDAO
    {

       public static string GetNewProduct()
       {
           BestLifeGetNewItemDataAction LvItem = new BestLifeGetNewItemDataAction();
           return LvItem.execute();
       }

       public static int SaveItem(Product PItem,Price_List PItemPL) 
       {
           BestLifeInsertItemDataAction LvItem = new BestLifeInsertItemDataAction(PItem, PItemPL);
           return  LvItem.execute();
       }

       public static DataTable GetProductByIdForPos(string PProductbarcode, string Pcatid)
       {
           BestLifeProductByIDDataAction LvGet = new BestLifeProductByIDDataAction(PProductbarcode, Pcatid);
           return LvGet.execute();
       }

       public static List<Product> GetAllProduct()
       {
           BestLifeGetAllProductDataAction LvGet = new BestLifeGetAllProductDataAction();
           return LvGet.execute();
       }

       public static DataTable GetProductByIdandplidForPos(string PProductid, string PPlid)
       {
           BestLifeProductByIDandPlidDataAction LvGet = new BestLifeProductByIDandPlidDataAction(PProductid, PPlid);
           return LvGet.execute();
       }



    }
}
